package com.tjise.vod.util;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @program: tjise_shixun
 * @description: 常量key
 * @author: 郑朝文
 * @create: 2021-06-25 18:22
 **/
@Component
public class ConstantVodUtils implements InitializingBean {
    // 获取配置文件中的值
    @Value("${aliyun.vod.file.keyid}")
    private String keyid;
    @Value("${aliyun.vod.file.keysecret}")
    private String keysecret;


    //  AccessKey ID
    public static String ACCESS_KEY_ID;
    // AccessKey Secret
    public static String ACCESS_KEY_SECRET;


    /**
     * 进行设置keyid和keysecret
     *
     * @throws Exception
     */
    @Override
    public void afterPropertiesSet() throws Exception {
        ACCESS_KEY_ID = keyid;
        ACCESS_KEY_SECRET = keysecret;

    }
}


